Skip to content

Rcsp new interface overloads - #538

Draft
andreacassioli wants to merge 4 commits into
boostorg:developfrom
andreacassioli:rcsp-new-interface-overloads
Draft

Rcsp new interface overloads#538
andreacassioli wants to merge 4 commits into
boostorg:developfrom
andreacassioli:rcsp-new-interface-overloads

Conversation

@andreacassioli

@andreacassioli andreacassioli commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Before submitting

  • This PR targets the develop branch.
  • I searched for an existing PR or issue covering the same change.
  • My contribution is licensed under the Boost Software License 1.0.

Type of change

  • Bug fix
  • New feature or API addition
  • Refactor (no behavior change)
  • Documentation
  • Build, CI, or tooling
  • Other (specify below)

Does this PR introduce a breaking change?

  • Yes (describe migration impact below)
  • No

What this PR does

  • Introduce a new set of interfaces that drop the unused edge index map. The old interfaces are kept but re-wired to the new ones.
  • tests are duplicated introducing a dedicated file for the old interface
  • examples are duplicated introducing a dedicated file for the old interface
  • No logic changes.

Motivation

The current interfaces expose a redundant parameter (edge index map)

  • interface cluttering
  • less readable code
  • less clear behavior (why is that parameter needed?)

The issue has been raised here #342

Testing

Checklist

  • Existing tests pass (b2 in the test/ directory).
  • New behavior is covered by a test, or this is a docs / build / refactor change.
  • Documentation was updated if user-facing behavior changed.
  • No new compiler warnings on the platforms I built against.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Boost dependency footprint vs develop (auto-generated).
PR run 30647819861 vs develop run 30257490731 (63ba3975ad).

Header-inclusion weights (graph files pulling each direct dependency in):

No header-inclusion-weight changes.

Transitive Boost modules: 68 → 68 (0)

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Compiler-warning counts vs develop (auto-generated).
PR run 30647821027 vs develop run 30257490643 (63ba3975ad).

Job Baseline After Delta
macos (clang, 14) 4 9 +5
macos (clang, 17) 4 9 +5
macos (clang, 20) 4 9 +5
ubuntu (clang-19, 14) 4 9 +5
ubuntu (clang-19, 17) 4 9 +5
ubuntu (clang-19, 20) 4 9 +5
ubuntu (clang-19, 23) 4 9 +5
ubuntu (gcc-14, 14) 10 18 +8
ubuntu (gcc-14, 17) 10 18 +8
ubuntu (gcc-14, 20) 10 18 +8
ubuntu (gcc-14, 23) 10 18 +8
windows_msvc_14_3 (msvc-14.3) 971 979 +8

@Becheler

Becheler commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Hi @andreacassioli !

Looks good to me, great work!

To tie it up, we would want to add deprecation notices on the old interfaces as mentioned in the previous conversation so users get a warning (note their position between template args and return type):

#include <boost/config.hpp>

template < class Graph, class VertexIndexMap, class EdgeIndexMap, class Resource_Container, class  Resource_Extension_Function, class Dominance_Function >
BOOST_DEPRECATED("edge_index_map is unused; drop it and call the 5-argument r_c_shortest_paths overload. Removal planned for Boost 1.95.")
void r_c_shortest_paths(const Graph& g, const VertexIndexMap& vertex_index_map, const EdgeIndexMap& edge_index_map, ...)
{
    r_c_shortest_paths(g, vertex_index_map, s, t, ...);
}

Old examples and test files should begin with a #define BOOST_ALLOW_DEPRECATED_SYMBOLS on their first line (before any include) to disable warnings (we know they are outdated and should soon be removed).

See demonstration here: https://godbolt.org/z/dYszsMaea

I think it's reasonable to duplicate the unit tests and the example here (at the cost of blowing up the PR size but there it's a transient inconvenient). If you could quickly confirm locally that the old and new example generate the same output that would be gold! 🙏🏽

Let me know if you have any question,
Thanks again for this cleanup help !
Arno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants